import 'package:demo1/provider/userprovider.dart';
import 'provider/addressbookprovider.dart';

import 'package:flutter/material.dart';
import 'package:provider/single_child_widget.dart';
import 'pages/root_page.dart';
import 'package:provider/provider.dart';
import 'provider/sputil.dart';

void main() {
  SpUtil.perInit();

  runApp(
    MultiProvider(
      providers: providers,
      child: MaterialApp(
        theme: ThemeData.light(),
        themeMode: ThemeMode.system,
        home: const RootPage(),
        //home: const SignUpScreen(),
        title: "hi",
      ),
    ),
  );
}

List<SingleChildWidget> providers = [
  ChangeNotifierProvider<UserProvider>(create: (_) => UserProvider()),
  ChangeNotifierProvider<AddressBookProvider>(
      create: (_) => AddressBookProvider()),
];
